#import <UIKit/UIKit.h>
#import "HFFormBasicModel.h"
typedef NS_OPTIONS(NSUInteger, HFFormRefreshMode) {
    HFFormRefreshModeRefresh            = 0x100 << 1,
    HFFormRefreshModeLoadMore           = 0x100 << 2,
    HFFormRefreshModeLoadMoreManual     = 0x100 << 3,
    HFFormRefreshModeNone               = 0x100 << 4
};
typedef NS_ENUM(NSUInteger, HFFormRowType) {
    HFFormRowTypeDefault = 100,
    HFFormRowTypeTitle,         
    HFFormRowTypeAlbum,         
    HFFormRowTypeOptions,       
    HFFormRowTypeDatePicker,    
    HFFormRowTypeSwitch,        
    HFFormRowTypeText,          
    HFFormRowTypeJump,          
    HFFormRowTypeSubmit,        
    HFFormRowTypeAddSection,    
    HFFormRowTypeCustom,        
    HFFormRowTypeLocation,      
    HFFormRowTypeCheckBox,      
    HFFormRowTypeTags,          
    HFFormRowTypeLoading,       
    HFFormRowTypeUnknow
};
typedef NS_ENUM(NSUInteger, HFFormRefreshType) {
    HFFormRefreshTypeAll = 200,   
    HFFormRefreshTypeRow,         
    HFFormRefreshTypeHeight       
};
@class HFFormRowModel;
typedef void(^HFFormRowValueChangedHandler)(id value);
typedef void(^HFFormRowReloadHandler)(HFFormRefreshType type);
typedef void(^HFFormRowValueInvalidHandler)();
typedef NSArray <HFFormRowModel *>*(^HFFormRowValueSubRowsHandler)();
typedef NSError *(^HFFormRowCheckHandler)(HFFormRowModel *row);
typedef NSDictionary *(^HFFormRowSettingHandler)();
typedef NSString *(^HFFormRowTitleHandler)();
@interface HFFormRowModel : HFFormBasicModel
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *content;
@property (nonatomic, copy) NSString *subfix;
@property (nonatomic, assign) UIKeyboardType keyboardType;
@property (nonatomic, assign) unsigned int numberOfLimit;
@property (nonatomic, assign) HFFormRowType type;
@property (nonatomic, assign) BOOL disable;
@property (nonatomic, assign) BOOL neccesary;
@property (nonatomic, assign) BOOL hideSeperateLine;
@property (nonatomic, strong) Class view;
@property (nonatomic, strong) NSString *jumpVC;
@property (nonatomic, strong) NSArray <HFFormRowModel *> *subRows;
@property (nonatomic, copy) HFFormRowReloadHandler reloadHandler;
@property (nonatomic, copy) HFFormRowValueChangedHandler valueHandler;
@property (nonatomic, copy) HFFormRowSettingHandler settingsHandler;
@property (nonatomic, strong, readonly) NSDictionary *settings;
@property (nonatomic, copy) HFFormRowTitleHandler titleHandler;
@property (nonatomic, copy) HFFormRowCheckHandler checkHandler;
@property (nonatomic, copy) HFFormRowValueInvalidHandler invalidHandler;
#pragma mark - 一般用于多选项PickerView
@property (nonatomic, strong) NSArray *multiDatas;
@property (nonatomic ,copy) HFFormRowValueSubRowsHandler subRowsHandler;
@property (nonatomic, copy) NSString *valueKey;
@property (nonatomic, copy) NSString *idKey;
@property (nonatomic ,strong) NSNumber *defaultSelectRow;
@property (nonatomic, strong) NSNumber *miniSelect;
@property (nonatomic, strong) NSString *miniSelectError;
@property (nonatomic, copy) NSString *formatter;
- (void)appendSettings:(NSDictionary *)dict;
@end
